package CfengMiddleWare.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 用户下单记录表
 * </p>
 *
 * @author cfeng
 * @since 2022-09-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class UserOrder extends Model<UserOrder> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单编号
     */
    private String orderNo;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 支付状态(1=已保存；2=已付款；3=已取消)
     */
    private Integer status;

    /**
     * 是否有效（1=有效；0=失效）
     */
    private Integer isActive;

    /**
     * 下单时间
     */
    private LocalDateTime createTime;

    private LocalDateTime updateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
